<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ page language="java" import="javazoom.upload.*,java.util.*" %>
<%@ page errorPage="ExceptionHandler.jsp" %>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>New Restaurantes</title>
        <link rel="stylesheet" href="../css/main.css" type="text/css" />
    </head>
    <body>
      <table cellpadding="0" cellspacing="0" align="center" style="Rest_table">
         <tr>
            <td>
        <f:view>
            <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            <h1>New restaurantes</h1>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="Nome:"/>
                    <h:inputText id="nome" value="#{restaurantes.restaurantes.nome}" title="Nome" />
                    <h:outputText value="Telefone:"/>
                    <h:inputText id="telefone" value="#{restaurantes.restaurantes.telefone}" title="Telefone" />
                    <h:outputText value="Endereco:"/>
                    <h:inputText id="endereco" value="#{restaurantes.restaurantes.endereco}" title="Endereco" />
                    <h:outputText value="Tipo:"/>
                    <h:selectOneMenu id="tipo" value="#{restaurantes.restaurantes.tipo}" required="yes">
                       <f:selectItem itemLabel="Bar" itemValue="Bar"/>
                       <f:selectItem itemLabel="Restaurante" itemValue="Restaurante"/>
                    </h:selectOneMenu>
                    <h:outputText value="Preco:"/>
                    <h:selectOneMenu value="#{restaurantes.restaurantes.preco}" required="yes">
                        <f:selectItem itemLabel="1" itemValue="1"/>
                        <f:selectItem itemLabel="2" itemValue="2"/>
                        <f:selectItem itemLabel="3" itemValue="3"/>
                        <f:selectItem itemLabel="4" itemValue="4"/>
                        <f:selectItem itemLabel="5" itemValue="5"/>
                    </h:selectOneMenu>
                    <h:outputText value="Atendimento:"/>
                    <h:selectOneMenu value="#{restaurantes.restaurantes.atendimento}" required="yes">
                        <f:selectItem itemLabel="1" itemValue="1"/>
                        <f:selectItem itemLabel="2" itemValue="2"/>
                        <f:selectItem itemLabel="3" itemValue="3"/>
                        <f:selectItem itemLabel="4" itemValue="4"/>
                        <f:selectItem itemLabel="5" itemValue="5"/>
                    </h:selectOneMenu>
                    <h:outputText value="Comida:"/>
                    <h:selectOneMenu value="#{restaurantes.restaurantes.comida}" required="yes">
                        <f:selectItem itemLabel="1" itemValue="1"/>
                        <f:selectItem itemLabel="2" itemValue="2"/>
                        <f:selectItem itemLabel="3" itemValue="3"/>
                        <f:selectItem itemLabel="4" itemValue="4"/>
                        <f:selectItem itemLabel="5" itemValue="5"/>
                    </h:selectOneMenu>
                    <h:outputText value="Bebida:"/>
                    <h:selectOneMenu value="#{restaurantes.restaurantes.bebida}" required="yes">
                        <f:selectItem itemLabel="1" itemValue="1"/>
                        <f:selectItem itemLabel="2" itemValue="2"/>
                        <f:selectItem itemLabel="3" itemValue="3"/>
                        <f:selectItem itemLabel="4" itemValue="4"/>
                        <f:selectItem itemLabel="5" itemValue="5"/>
                    </h:selectOneMenu>
                    <h:outputText value="Indicacao:"/>
                    <h:inputText id="indicacao" value="#{restaurantes.restaurantes.indicacao}" title="Indicacao" />
                    <h:outputText value="Observacao:"/>
                    <h:inputTextarea id="observacao" value="#{restaurantes.restaurantes.observacao}" title="Observacao" />
                </h:panelGrid>
                <h:commandLink action="#{restaurantes.create}" value="Adicionar"/>
                <br>
                <h:commandLink action="restaurantes_list" value="Listar Restaurantes"/>
                <br>
                <a href="/Qualeaboa/index.jsp">Voltar ao início</a>
            </h:form>
        </f:view>
     </td>
  </tr>
</table>
    </body>
</html>
